# Automatically install CRAN libraries and check that GDAL is installed
eAtlasDataTools.installPackages <- function(){
	cranPackagesNeeded <- c("R.utils", "RCurl", "tools", "XML")
	packagesToInstall <- setdiff(cranPackagesNeeded,rownames(installed.packages()))
	if (length(packagesToInstall) > 0) {
		install.packages(packagesToInstall)
	} else {
		print("No packages to install")
	}

	# Test for external system call dependancies
	if (nchar(Sys.which("gdal_translate")) == 0) {
		warning("No GDAL install detected. Please install from OSGeo4W")
	}
}